diff -urN libvmime-0.7.1-pristine/src/defaultParameter.cpp libvmime-0.7.1/src/defaultParameter.cpp
--- libvmime-0.7.1-pristine/src/defaultParameter.cpp	2005-06-21 19:06:35.000000000 +0200
+++ libvmime-0.7.1/src/defaultParameter.cpp	2006-08-01 10:42:18.277853120 +0200
@@ -200,7 +200,8 @@
 	bool needQuoting = false;
 	string::size_type valueLength = 0;
 
-	for (string::size_type i = 0 ; (i < value.length()) && (pos + valueLength < maxLineLength - 4) ; ++i, ++valueLength)
+	// Use worst-case length name.length()+2 for 'name=' part of line
+	for (string::size_type i = 0 ; (i < value.length()) && (pos + name.length() + 2 + valueLength < maxLineLength - 4) ; ++i, ++valueLength)
 	{
 		switch (value[i])
 		{
